package org.devf.fork.imsimulator.model;

import javafx.beans.property.IntegerProperty;
import javafx.beans.property.SimpleIntegerProperty;
import org.devf.fork.imsimulator.socket.dto.BizType;
import org.devf.fork.imsimulator.socket.dto.MsgContents;
import org.devf.fork.imsimulator.socket.dto.MsgStatus;

/**
 * ChatMessageModel related
 *
 * @author wanghuafu
 * @since 1.0  2023/9/25 11:41
 */
public class ChatMessageItem {

    /**
     * 数据ID
     */
    private String packageId;
    /**
     * 业务类型
     *
     * @see BizType
     */
    private String bizType;
    /**
     * 消息状态
     *
     * @see MsgStatus
     */
    private final IntegerProperty msgStatus = new SimpleIntegerProperty();

    private UserModel fromUser;
    private UserModel destUser;

    /**
     * 数据包生成时间
     */
    private String createTime;

    /**
     * 内容
     */
    private MsgContents message;


    public String getPackageId() {
        return packageId;
    }

    public void setPackageId(String packageId) {
        this.packageId = packageId;
    }

    public String getBizType() {
        return bizType;
    }

    public void setBizType(String bizType) {
        this.bizType = bizType;
    }

    public int getMsgStatus() {
        return msgStatus.get();
    }

    public IntegerProperty msgStatusProperty() {
        return msgStatus;
    }

    public void setMsgStatus(int msgStatus) {
        this.msgStatus.set(msgStatus);
    }

    public UserModel getFromUser() {
        return fromUser;
    }

    public void setFromUser(UserModel fromUser) {
        this.fromUser = fromUser;
    }

    public UserModel getDestUser() {
        return destUser;
    }

    public void setDestUser(UserModel destUser) {
        this.destUser = destUser;
    }

    public String getCreateTime() {
        return createTime;
    }

    public void setCreateTime(String createTime) {
        this.createTime = createTime;
    }

    public MsgContents getMessage() {
        return message;
    }

    public void setMessage(MsgContents message) {
        this.message = message;
    }
}
